#ifndef AUTO_REPORT_H
#define AUTO_REPORT_H

#include "smart_sensor.h"

#define SENSOR_CHN_NUMS   SENSOR_NUMS

#define POWER_ON_COMPARE_DATA  100
#define REPORT_RETRY_TIME      10
#define REPORT_RETRY_CNT       3

typedef enum
{
	ON_POWER_RETRY,
	FIXED_FREQ_RETRY,
	FIXED_STEP_RETRY,
}retry_type_t;

enum
{
    TEMP = 0x03,
    HUMI = 0x04,
    LARGE_ILLUMINATION = 0X15,
    NATURAL_LIGHT = 0X16,
};

enum
{
    MODE_IDEL      = 0x00,
    MODE_REPORT_GW = 0x01,
    MODE_LOCAL     = 0x02,
    MODE_REPORT_ALL     = 0x03,
    MODE_REPORT_PLATFORM = 0x04,
    MODE_ALARM     = 0x05,
};

enum
{
    REPORT_NO,
    REPORT_GW,
    REPORT_SB
};

void  auto_report_init(uint16_t freq,uint16_t step[],uint16_t power_on_delay_time,uint16_t snesor_nums);
int auto_report_hook_1s(sensor_device_t sensor[],int sen_nums);
void report_frame_ack(uint8_t *data, int data_len);
#endif // AUTO_REPORT_H
